package com.dmz.task.service;


import com.dmz.task.mapper.FileTaskLockMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class FileTaskLockService {

    @Autowired
    private FileTaskLockMapper fileTaskLockMapper;

    public boolean getkey(String key) {
        return fileTaskLockMapper.getLock(key) > 0;
    }

    public boolean releaseLock(String key) {
        return fileTaskLockMapper.releaseLock(key) > 0;
    }
}
